{% extends "system_setup/base.html" %}

{% block page_link %}
    <script src="../../static/system_setup/js/role_list.js"></script>
    <link rel="stylesheet" href="../../static/system_setup/css/zTreeStyle/zTreeStyle.css">
    <link rel="stylesheet" href="../../static/system_setup/css/style.css">
{% endblock %}


{% block style %}
    <style>
        .add_class{
            background: #1E90FF;
        }
        tr{
            height: 35px;
        }
        th{
            text-align: center;
        }
        table {
            table-layout: fixed;
        }
        td:first-child, th:first-child {
            position:sticky;
            left:0; /* 首行永远固定在左侧 */
            z-index:1;
        }
        thead tr th {
            position:sticky;
            top:0; /* 列首永远固定在头部  */
            background-color: #E8E8E8;
        }
        th:first-child{
            z-index:2;
        }
        .model_li{
            color: #3f414d;
            width: 25%;
            cursor: pointer;
            display: none;
        }
        td{
            text-overflow:ellipsis;
            -moz-text-overflow:ellipsis;
            overflow:hidden;
            white-space: nowrap;
        }
        .detail_p{
            margin-left: 5%;margin-top: 2%;cursor: pointer;
        }
    </style>
{% endblock %}



{% block right_content %}
    <div class="headline">
        <div style="width: 15%;height: 100%;line-height: 40px;float: left;padding-left: 1%;">
            <a href="role_list.html" style="color: #0b0b0b;">
                <i class="iconfont icon-jiaoseguanli"></i>
                <span> 角色列表</span>
            </a>
        </div>

        <div style="width: 7%;text-align: center;height: 100%;line-height: 40px;float: right;margin-right: 2%;">
            <button onclick="Confirm_delete()" data-toggle="modal" data-target=".bd-example-modal-sm" style="height: 30px;width: 90%" type="button" class="btn btn-danger add-station1">删除</button>
        </div>

        <div style="width: 7%;text-align: center;height: 100%;line-height: 40px;float: right;">
            <a href="new_role.html">
                <button style="height: 30px;width: 90%" data-toggle="modal" data-target=".bd-example-modal-xl" id="add_station" type="button" class="btn btn-default add-station">新增</button>
            </a>
        </div>
    </div>

    <div class="right-box" style="width: 100%;height: 95%;">
        <div style="height: 88%;width: 100%;overflow: auto;border-bottom-color: #cfcfcf;">
            <table class="table table-hover table-bordered" style="border-collapse: collapse;width: 100%;table-layout:fixed;">
                <thead>
                    <tr>
                        <th scope="col" style="width: 5%;">
                            <input type="checkbox" onclick="check_all_not()" id="check_all">
                        </th>
                        <th scope="col" style="width: 10%;">角色名称</th>
                        <th scope="col" style="width: 30%;">权限</th>
                        <th scope="col" style="width: 35%;">备注</th>
                        <th scope="col" style="width: 8%;">操作</th>
                    </tr>
                </thead>
                <tbody style="overflow: auto;" id="t_table"></tbody>
            </table>
            <div id="img-display" style="width: 75%;text-align: center;position: fixed;display: none;">
                <div style="margin-top: 10%;">
                    <img src="../../static/public_file/images/page-img/11.jpg" alt="">
                    <p style="margin: 0;padding: 0;vertical-align: top;">暂无数据</p>
                </div>
            </div>
        </div>
        <div style="width: 100%;border: #cfcfcf solid 1px;"></div>
        <div id="pagination" class="pagination" style="margin-left: 20px;margin-top: 1.5%;"></div>
    </div>

    <div class="modal fade bd-example-modal-xl1" tabindex="-1" role="dialog"   aria-hidden="true">
        <div class="modal-dialog modal-xl" style="margin-top: 3%;">
            <div class="modal-content"  style="height: 600px;border-radius: 7px;width: 900px;margin-left: 15%;background: #F8F8FF;">
                <div class="modal-header" style="height: 50px;">
                    <h5 class="modal-title" style="line-height: 50px;width: 10%;">角色详情</h5>
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close" style="margin-right: 3%;line-height: 50px;">
                        <span aria-hidden="true" style="font-size: 28px;">&times;</span>
                    </button>
                </div>

                <div style="height: 500px;">
                    <div style="height: 100%;width: 20%;background: mintcream;display: inline-block;vertical-align: top;margin-left: 0.5%;">
                        <div style="width: 100%;height: 40px;background: #1E90FF;">
                            <div style="width: 50%;color: #ffffff;text-align: center;line-height: 40px;">角色名称</div>
                        </div>
                        <div style="width: 100%;height: 92%;overflow: auto;">
                            <div id="model-character" style="width: 100%;">
                            </div>
                        </div>
                    </div>
                    <div style="height: 100%;width: 39%;background: mintcream;display: inline-block;vertical-align: top;">
                        <div style="width: 100%;height: 40px;background: #1E90FF;">
                            <div style="width: 15%;color: #ffffff;text-align: center;line-height: 40px;">权限</div>
                        </div>
                        <div style="width: 100%;height: 92%;overflow: auto;">
                            <div id="model-permission" style="width: 100%;"></div>
                        </div>
                    </div>
                    <div style="height: 100%;width: 39%;background: mintcream;display: inline-block;vertical-align: top;">
                        <div style="width: 100%;height: 40px;background: #1E90FF;">
                            <div style="width: 10%;color: #ffffff;text-align: center;line-height: 40px;">备注</div>
                        </div>
                        <div style="width: 100%;height: 92%;overflow: auto;">
                            <div id="model-remark" style="width: 100%;">
                            </div>
                        </div>
                    </div>
                </div>

                <div class="modal-footer" style="height: 50px;">
                    <button id="model-close" type="button" class="btn btn-secondary" data-dismiss="modal" style="margin-right: 2%">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;关&nbsp;闭&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</button>
                </div>
            </div>
        </div>
    </div>

    <!--确认删除？-->
    <div class="modal fade bd-example-modal-sm" tabindex="-1" role="dialog"  aria-hidden="true">
        <div class="modal-dialog modal-sm" style="margin-top: 10%;">
            <div class="modal-content" style="height: 150px;border-radius: 7px;width: 300px;background: #F8F8FF;border: #1E90FF solid 1px;">
                <div class="modal-header" style="height: 40px;background: #1E90FF;border-top-left-radius: 7px;border-top-right-radius: 7px;">
                    <h5 class="modal-title" style="line-height: 40px;width: 40%;text-align: center;color: #ffffff;">
                        提示对话框
                    </h5>
                    <button id="close-model2" type="button" class="close" data-dismiss="modal" aria-label="Close" style="margin-right: 3%;line-height: 40px;">
                        <span aria-hidden="true" style="font-size: 28px;color: white;">&times;</span>
                    </button>
                </div>
                <div class="modal-body" style="height: 50px;line-height: 60px;text-align: center;">
                    <p id="Confirm-content" ></p>
                </div>
                <div class="modal-footer" style="height: 40px;">
                    <button type="button" class="btn btn-primary" style="margin-left: 2%;margin-right: 2%;background: #1E90FF;" onclick="delete_data()">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;确&nbsp;认&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</button>
                </div>
            </div>
        </div>
    </div>
{% endblock %}
